package mode;

import java.util.Map;
import java.util.stream.Collectors;

public class NormalMode implements Mode {
    @Override
    public String formatNotification(Map<String, Double> map) {
        return map.entrySet().parallelStream().map(e -> {
            final Double value = e.getValue();
            String strValue = value >= 0 ? "+" + value + "%" : value + "%";
            return e.getKey() + ": " + strValue;
        }).collect(Collectors.joining("\n"));
    }
}
